// 拼接HTTPUrl
/*function url(path) {
  return '/local/' + path;
}*/

function url(pathname) {
  return window.RPConfig['local'] + pathname;
}

const ruleListAPI = {
  // 分页查询/rule/groupGold/page
  querylist: params => {
    return $http.post(url('/rule/groupGold/page'), params).then(res => res.data);
  },
  // 导出  //rule/gold/export
  exportData: params => {
    return $http.post(url('/rule/gold/export'), params,'',{responseType: "blob" });
  },


  // 黄金记录规则组-查询规则组列表//rule/groupGold/list
  getGroupList: params => {
    return $http.post(url('/rule/groupGold/list'), params).then(res => res.data);
  },
  // 黄金记录规则脚本-查询规则脚本列表//rule/scriptGold/list
  getScriptList: params => {
    return $http.post(url('/rule/scriptGold/list'), params).then(res => res.data);
  },
  // 黄金记录规则脚本-分页查询规则脚本//rule/scriptGold/page
  getScriptPage: params => {
    return $http.post(url('/rule/scriptGold/page'), params).then(res => res.data);
  },
}
export default ruleListAPI
